package law_of_demeter;

public class Foo2 {
	/**
	 * This example will result in two violations.
	 */

	public void example2(Bar b) {
		
		// replace 
		/*C c = b.getC();

		c.doIt();*/
		
		// with
		b.doItOnC();
		
	}


	public void example4(Bar b) {
		
		// replace
		// b.getC().doIt();
		
		// with
		b.doItOnC();

	}

}
